package com.ams.thread.lesson7;

import lombok.extern.slf4j.Slf4j;

/**
 * @author： 乐哥聊编程(全平台同号)
 */
@Slf4j
public class Example17 {
    public static void main(String[] args) {
        new Thread(new Thread1()).start();
    }

    static class Thread1 implements Runnable {

        @Override
        public void run() {
            synchronized (Example17.class) {
                synchronized (Example17.class) {
                    log.info("成功获取重入锁");
                }
            }
        }
    }
}
